home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / C++ AppleLink Messages / CPlus.Dev$ 1⁄19⁄90 / 0040-C++ and the "asm" ke-Jan90 < prev    next >
Encoding:
Text File  |  1990-01-19  |  1.1 KB  |  37 lines  |  [TEXT/GEOL]

  1. Item forwarded  by  ALCABES      to CPLUS.APPLE$
  2.  
  3. Item    7846321                         17-Jan-90        12:18
  4.  
  5. From:   D0578                           Shiva,PRT
  6.  
  7. To:     CPLUS.DEV$                      C++ Interest List--Developers
  8.  
  9. Sub:    C++ and the "asm" keyword
  10.  
  11. Help!  I'm having a small problem with the C++ compiler, which may reflect a
  12. deficiency in my own understanding.
  13.  
  14. It involves the "asm" keyword.
  15. According to the AT&T manuals provided with the compiler, the proper syntax of
  16. the "asm" keyword is as follows:
  17.  
  18.     asm ( string );
  19.  
  20. I tried the following in my code (an ATP completion routine)
  21.  
  22.     asm (
  23.         MOVE.L  A0,D0           ; put pointer to param blk in correct register
  24.         MOVEQ   #app1Evt,A0     ; event number in A0
  25.         _PostEvent              ; and put it into the queue
  26.     );
  27.  
  28. It doesn't work at all.  In fact, the very first line generates a "syntax
  29. error".  It then announces errors on all the following lines.
  30.     What am I doing wrong?  Is "asm" implemented in MPW's CFront?
  31.  
  32.     Thanks in advance for the help.
  33.  
  34.     Mark Pesce,
  35.     Shiva Corporation
  36.  
  37.